@font-face {
    font-family: 'BodyFont';
    src: local('Roboto Regular'), local('Roboto-Regular'), url('./fonts/Roboto-Regular.ttf');
    font-style: normal;
    font-weight: normal;
    font: "width" 100;
}
@font-face {
    font-family: 'BodyFont';
    src: local('Roboto SemiBold'), local('Roboto-SemiBold'), url('./fonts/Roboto-SemiBold.ttf');
    font-style: normal;
    font-weight: bold;
}
@font-face {
    font-family: 'BodyFont';
    src: local('Roboto Italic'), local('Roboto-Italic'), url('./fonts/Roboto-Italic.ttf');
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: 'BodyFont';
    src: local('Roboto SemiBoldItalic'), local('Roboto-SemiBoldItalic'), url('./fonts/Roboto-SemiBoldItalic.ttf');
    font-style: italic;
    font-weight: bold;
}
@font-face {
    font-family: 'MonoFont';
    src: local('RobotoMono Regular'), local('RobotoMono-Regular'), url('./fonts/RobotoMono-Regular.ttf');
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: 'MonoFont';
    src: local('RobotoMono Bold'), local('RobotoMono-Bold'), url('./fonts/RobotoMono-Bold.ttf');
    font-style: normal;
    font-weight: bold;
}
@font-face {
    font-family: 'MonoFont';
    src: local('RobotoMono Italic'), local('RobotoMono-Italic'), url('./fonts/RobotoMono-Italic.ttf');
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: 'MonoFont';
    src: local('RobotoMono BoldItalic'), local('RobotoMono-BoldItalic'), url('./fonts/RobotoMono-BoldItalic.ttf');
    font-style: italic;
    font-weight: bold;
}

:root {
    --sha-body-font: 'BodyFont', 'Open Sans', 'Clear Sans', 'Helvetica Neue', Helvetica, Arial, 'Segoe UI Emoji', 'SF Pro', sans-serif;
    --sha-color-header: #264F87;
    --sha-font-size: 20px;
    --sha-font-size-alert: 20px;
    --sha-font-size-alert-small: 16px;
}

html {
    font-size: var(--sha-font-size);
	/* Скопировно из шаблона pandoc */
	color: #1a1a1a;
    background-color: #fdfdfd;
	/* Скопировно из шаблона pandoc */
}

body {
    font-family: var(--sha-body-font);
    line-height: 1.3;
	
	margin: 0 auto;
    max-width: 64em;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 50px;
    padding-bottom: 50px;
    hyphens: auto;
    overflow-wrap: break-word;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
	
	
}

/*
table {
    border-style: hidden;
    border-width: 0;
}

.no-border tr td {
    border-style: hidden;
    border-width: 0;
}
*/
/* 
--- модификация АБЗАЦа ---
 */
p {
    text-align: justify;
	margin: 1em 0;
}

/* 
--- модификация ЗАГОЛОВКов --- 
*/
h1, h2, h3, h4, h5, h6 {
    color: var(--sha-color-header);
    page-break-after: avoid;
}
h2 {
    border-bottom: 0;
}

/* Запрет переноса на другую страницу */
h1+h2, h2+h3, h3+h4, h4+h5, h5+h6 {
    page-break-before: avoid;
}

/* #write h1::after, #write h2::after, #write h3::after,
#write h4::after, #write h5::after, #write h6::after {
    color: #e7eaed;
    font-size: 0.5em;
    padding-left: 10px;
}
#write h1:after {
    content: "\2630";
}
#write h2:after {
    content: "\2630\2630";
}
#write h3:after,
h3.md-focus.md-heading:after {
    content: "\2630\2630\2630";
}
#write h4:after,
h4.md-focus.md-heading:after {
    content: "\2630\2630\2630\2630";
}
#write h5:after,
h5.md-focus.md-heading:after {
    content: "\2630\2630\2630\2630\2630";
}
#write h6:after,
h6.md-focus.md-heading:after {
    content: "\2630\2630\2630\2630\2630\2630";
} */

/* override the default style for focused headings */
#write>h3.md-focus:after, #write>h4.md-focus:after,
#write>h5.md-focus:after, #write>h6.md-focus:after,
h3.md-focus:after, h4.md-focus:after,
h5.md-focus:after, h6.md-focus:after {
    /* color: inherit; */
    color: #e7eaed;
    /* font-size: inherit; */
    font-size: 0.5em;
    border: inherit;
    border-radius: inherit;
    position: inherit;
    left: initial;
    float: none;
    top: initial;
    padding-left: 10px;
    padding-right: inherit;
    vertical-align: inherit;
    font-weight: inherit;
    line-height: inherit;
}

/* НУМЕРАЦИЯ ЗАГОЛОВКОВ: начало кода
   Заголовки нумеруются со 2-го уровня. Заголовки 1-го уровня используются, как наименования документов 
*/
#write { counter-reset: h2 }
h2 { counter-reset: h3 }
h3 { counter-reset: h4 }
h4 { counter-reset: h5 }
h5 { counter-reset: h6 }
#write h2:before {
    counter-increment: h2;
    content: counter(h2) ". ";
    font-size: 0.8em;
}
#write h3:before,
h3.md-focus.md-heading:before {
    counter-increment: h3;
    content: counter(h2) "." counter(h3) ". ";
    font-size: 0.8em;
}
#write h4:before,
h4.md-focus.md-heading:before {
    counter-increment: h4;
    content: counter(h2) "." counter(h3) "." counter(h4) ". ";
    font-size: 0.8em;
}
#write h5:before,
h5.md-focus.md-heading:before {
    counter-increment: h5;
    content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";
    font-size: 0.8em;
}
#write h6:before,
h6.md-focus.md-heading:before {
    counter-increment: h6;
    content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". ";
    font-size: 0.8em;
}
#write>h3.md-focus:before, #write>h4.md-focus:before, #write>h5.md-focus:before, #write>h6.md-focus:before,
h3.md-focus:before, h4.md-focus:before, h5.md-focus:before, h6.md-focus:before {
    color: inherit;
    border: inherit;
    border-radius: inherit;
    position: inherit;
    left:initial;
    float: none;
    top:initial;
    font-size: 0.8em;
    padding-left: inherit;
    padding-right: inherit;
    vertical-align: inherit;
    font-weight: inherit;
    line-height: inherit;
}
/* НУМЕРАЦИЯ ЗАГОЛОВКОВ: конец кода */

/*
--- модификация ЦИТАТЫ ---
*/
blockquote {
    border-left: 6px solid #FBC02D;
    color: black;
    margin: 0px;
    padding: 16px 24px;
    position: relative;
    text-align: left;
    text-align-last: left;
}
blockquote b, blockquote strong {
    color: #264F87;
}
blockquote:before {
    content: "";
    position: absolute;
    top: 25px;
    left: -6px;
    height: 30px;
    background-color: #fff;
    width: 6px;
    margin-top: -1em;
}
blockquote:after {
    content: "\00BB";
    position: absolute;
    top: 12px;
    left: -10px;
    color: #264F87;
    font-size: 30px;
    font-family: 'BodyFont', Arial, sans-serif;
    font-weight: bold;
    line-height: 20px;
}
blockquote code {
    color: black;
}
blockquote cite {
    color: #337AB7;
    font-size: 15px;
    padding-top: 10px;
    display: block;
    text-align: right;
}
blockquote ol {
    line-height: 1.1;
}

/* blockquote ol {
    line-height: 1.0;
    padding-left: 20px;

    list-style-type: none;
    counter-reset: my_BLQT_counter 0;

    li::before {
        counter-increment: my_BLQT_counter;
        content: counter(my_BLQT_counter) ".";

        color: #264F87;
        display: inline-block;
        font-weight: normal;
        position: absolute;
	    left: -25px;
        text-align: center;
        width: 30px;
    }
}
blockquote ul {
    line-height: 1.0;
} */

/*
--- модификация НУМЕРОВАННОГО СПИСКА (ordered list) ---
*/
ol li::marker {
    font-weight: bold;
}


ol {
	text-align: justify;
}

/*
--- модификация НЕНУМЕРОВАННОГО СПИСКА (unordered list) ---
*/
ul {
    list-style-type: "\2013\0020\0020";
	text-align: justify;
}

/* 
    --- модификация СПИСКА ЗАДАЧ --- 
*/
.task-list-done {
    /* styles for completed tasks */
    text-decoration: line-through;
    text-decoration-color: gray;
}
.task-list-not-done {
    /* styles for incomplete tasks */
}

/* 
    --- модификация ВЫДЕЛЕНИЯ (МАРКЕРА) ---
*/
mark {
    background-color: inherit;
    color: var(--sha-color-header) !important;
    font-weight: normal;
}
mark * {
    color: var(--sha-color-header) !important;
}

/* 
    --- модификация ОПОВЕЩЕНИЙ (alerts) ---
 */
.md-alert {
    border-left: 3px solid;
    margin-left: 12px;
    font-size: var(--sha-font-size-alert);
}
/* .md-alert-text svg {
    fill: currentcolor; position: relative; top: 0.125em; margin-right: 1ch; overflow: visible;
} */
/* Заметка */
.md-alert.md-alert-note {
    border-left-color: gainsboro;
    font-size: var(--sha-font-size-alert-small);
    & strong {
        color: #4D4D4D;
    }
    & .md-alert-text-container {
        display: inline;
    }
}
.md-alert-text-note {
    color: gray;
    & .md-alert-text-container:before {
        content: "\22EF";
        margin-right: 1ch;
    }
    & .md-alert-text-container:after {
        content: "\22EF";
    }
}
.md-alert-text-note svg {
    fill: currentcolor;
    position: relative;
    top: 0.125em;
    margin-right: 1ch;
    overflow: visible;
}

/* Совет */
.md-alert.md-alert-tip {
    border-left-color: #52C375;
    font-size: var(--sha-font-size-alert-small);
    & strong {
        color: rgb(31, 136, 61);
    }
}
.md-alert-text-tip {
    color: #52C375;
    & .md-alert-text-container:before {
        content: "\22EF";
        margin-right: 1ch;
    }
    & .md-alert-text-container:after {
        content: "\22EF";
    }
}

/* Важное */
.md-alert.md-alert-important {
    border-left-color: #4290ED;
    & strong {
        color: rgb(9, 105, 218);
    }
}
.md-alert-text-important {
    color: #4290ed;
    & .md-alert-text-container:before {
        content: "\22EF";
        margin-right: 1ch;
    }
    & .md-alert-text-container:after {
        content: "\22EF";
    }
}

/* Предупреждение */
.md-alert.md-alert-warning {
    border-left-color: #CD9933;
    & strong {
        color: rgb(154, 103, 0);
    }
}
.md-alert-text-warning {
    color: #CD9933;
    & .md-alert-text-container:before {
        content: "\22EF";
        margin-right: 1ch;
    }
    & .md-alert-text-container:after {
        content: "\22EF";
    }
}

/* Опасность */
.md-alert.md-alert-caution {
    border-left-color: #E75661;
    & strong {
        color: rgb(207, 34, 46);
    }
}
.md-alert-text-caution {
    color: #E75661;
    & .md-alert-text-container:before {
        content: "\22EF";
        margin-right: 1ch;
    }
    & .md-alert-text-container:after {
        content: "\22EF";
    }
}

/* Примечание
.note {
  padding: 10px;
  border: 1px solid #ccc;
  margin: 10px 0;
}
.note i {
  margin-right: 8px;
  color: #337ab7;
}
*/

@media print {
    html {
        font-size: 14px;
		background-color: white;
    }
    small {
        font-size: 10px;
    }
	
	body {
        background-color: transparent;
        color: black;
        font-size: 12pt;
      }
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
    h2, h3, h4 {
        page-break-after: avoid;
    }

}


@media (max-width: 600px) {
      body {
        font-size: 0.9em;
        padding: 12px;
      }
      h1 {
        font-size: 1.8em;
      }
}

    a {
      color: #1a1a1a;
    }
    a:visited {
      color: #1a1a1a;
    }
    img {
      max-width: 100%;
    }
    svg {
      height: auto;
      max-width: 100%;
    }	

    code {
      font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
      font-size: 85%;
      margin: 0;
      hyphens: manual;
    }
    pre {
      margin: 1em 0;
      overflow: auto;
    }
    pre code {
      padding: 0;
      overflow: visible;
      overflow-wrap: normal;
    }
    .sourceCode {
     background-color: transparent;
     overflow: visible;
    }
    hr {
      border: none;
      border-top: 1px solid #1a1a1a;
      height: 1px;
      margin: 1em 0;
    }
    table {
      margin: 1em 0;
      border-collapse: collapse;
      width: 100%;
      overflow-x: auto;
      display: block;
      font-variant-numeric: lining-nums tabular-nums;
    }
    table caption {
      margin-bottom: 0.75em;
    }
    tbody {
      margin-top: 0.5em;
      border-top: 1px solid #1a1a1a;
      border-bottom: 1px solid #1a1a1a;
	  text-align: justify;
    }
	
	tbody tr:nth-child(odd) {
      background-color: #fff; /* Нечётные строки — белый фон */
    }

    tbody tr:nth-child(even) {
      background-color: #f2f2f2; /* Чётные строки — светло-серый фон */
    }
	
	
    th {
      border-top: 1px solid #1a1a1a;
      padding: 0.25em 0.5em 0.25em 0.5em;
    }
    td {
      padding: 0.125em 0.5em 0.25em 0.5em;
    }
    header {
      margin-bottom: 4em;
      text-align: center;
    }
    #TOC li {
      list-style: none;
    }
    #TOC ul {
      padding-left: 1.3em;
    }
    #TOC > ul {
      padding-left: 0;
    }
    #TOC a:not(:hover) {
      text-decoration: none;
    }
    code{white-space: pre-wrap;}
    span.smallcaps{font-variant: small-caps;}
    div.columns{display: flex; gap: min(4vw, 1.5em);}
    div.column{flex: auto; overflow-x: auto;}
    div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
    /* The extra [class] is a hack that increases specificity enough to
       override a similar rule in reveal.js */
    ul.task-list[class]{list-style: none;}
    ul.task-list li input[type="checkbox"] {
      font-size: inherit;
      width: 0.8em;
      margin: 0 0.8em 0.2em -1.6em;
      vertical-align: middle;
    }
    .display.math{display: block; text-align: center; margin: 0.5rem auto;}